package test;

import java.util.Scanner;

public class LeftDay {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		System.out.println("输入月份");
		int month = scan.nextInt();
		System.out.println("输入日期");
		int day = scan.nextInt();
		int dayMonth = 0;
		int dayLeft;
		switch(month) {
		case 1:
			dayMonth=0;
			break;
		case 2:
			dayMonth=31;
			break;
		case 3:
			dayMonth=59;
			break;
		case 4:
			dayMonth=90;
			break;
		case 5:
			dayMonth=120;
			break;
		case 6:
			dayMonth=151;
			break;
		case 7:
			dayMonth=181;
			break;
		case 8:
			dayMonth=212;
			break;
		case 9:
			dayMonth=242;
			break;
		case 10:
			dayMonth=273;
			break;
		case 11:
			dayMonth=303;
			break;
		case 12:
			dayMonth=334;
			break;
		}
		dayLeft = 365 - (dayMonth + day);
				System.out.println(dayLeft);
	}
}
